﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CPPEI.Coolzon.Core.Data;

namespace CPPEI.Coolzon.Core.Repositories
{
    public interface ISolutionRepository
    {
        PagedList<Solution> GetSolutionList(DbContext context, int start, int limit);

        bool CreateSolution(DbContext context, Solution solution);

        bool RemoveSolution(DbContext context, Solution solution);

        bool UpdateSolution(DbContext context, Solution solution);


        /// <summary>
        /// 通过solutionId获取solution对象
        /// </summary>
        /// <param name="context"></param>
        /// <param name="solutionId"></param>
        /// <returns></returns>
        Solution GetSolution(DbContext context, Guid solutionId);


        /// <summary>
        /// 通过solutionName获取solution对象
        /// </summary>
        /// <param name="context"></param>
        /// <param name="solutionName"></param>
        /// <returns></returns>
        Solution GetSolution(DbContext context, string solutionName);
    }
}
